Outside walls must be insulated with at least 4 inches of fiberglass batting or with at least 3 inches of plastic foam insulation.
' Building code tester ' PRINT "Enter inches of fiber glass" INPUT FIBER PRINT "Enter inches of plastic foam" INPUT FOAM IF FIBER >= 4 OR FOAM >= 3 THEN PRINT "House meets Code." ELSE PRINT "House does NOT meet code." END IF ' END
Since it is even better if the house exceeds requirements, OR is the correct choice.
Here is what would happen if a house had 6 inches of fiberglass batting and 0 inches of plastic foam:
FIBER >= 4 OR FOAM >= 3 --------- --------- true false --------------- true
One TRUE is enough.
AND is different from OR. Both of them combine TRUE/FALSE values into one TRUE/FALSE value. But each does it in a different way:
Pick TRUE or FALSE for each of the following:
5 > 2 OR 12 <= 7 T or F 5 > 2 AND 12 <= 7 T or F 3 = 8 OR 6 <> 6 T or F 3 = 8 AND 6 <> 6 T or F
(Remember that <> means "not equal.")